{extend name="admin@public:base" /}

{block name="header"}<link rel="stylesheet" type="text/css" href="__STATIC__/google/css/css.css"/>{/block}

{block name="content_body"}
	<div class="block-header">
		<h5>平台管理</h5>
	</div>		
	<div class="card">
        <div class="header">
            <a href="{:url('admin/center.admin/platform_edit')}">新增平台</a>

        </div>
		<div class="body table-responsive">
			<table class="table table-striped table-hover">
                <thead>
                    <tr>
                        <th>平台</th>
                        <th>平台说明</th>
                        <th>平台IP</th>
                        <th>端口</th>
                        <th>是否禁用</th>             
                        <th>操作</th>             
                    </tr>
                </thead>
                <tbody>
                    {foreach $platforms as $key=>$vo}
                        <tr>
                            <td>{$vo['platform']}</td>
                            <td>{$vo['title']}</td>
                            <td>{$vo['ip']}</td>
                            <td>{$vo['port']}</td>
                            <td>
                                {eq name="vo['is_disabled']" value="0"} 
                                <a class="red open_btn" href="{:url('admin/center.admin/platform_edit', array('platform'=>$vo['platform']))}">
                                <div><button class="btn btn-minier  btn-yellow ">开启</button></div>
                                </a>
                                {else/}
                                <a class="red open_btn" href="{:url('admin/center.admin/platform_edit', array('platform'=>$vo['platform']))}">
                                <div><button class="btn btn-minier btn-danger">禁用</button></div>
                                </a>
                                
                                {/eq}
                            
                            <td>
                                	   
                            <a href="{:url('admin/center.admin/platform_edit', array('platform'=> $vo['platform']))}">修改</a>
                            &nbsp;&nbsp;
                            <a href="{:url('admin/center.admin/platform_del', array('platform'=> $vo['platform']))}"  data-info="你确定要删除吗？" class="tooltip-error confirm-rst-url-btn" data-rel="tooltip" title="" data-original-title="删除">删除</a>
                            </td>

                        </tr>
                    {/foreach}
                </tbody>

                <tfoot>
                    <tr>
                        <td colspan="6">{$page|raw}</td>
                    </tr>
                </tfoot>
			</table>
		</div>
	</div>	
{/block}

